<?php

namespace app\controller;

use app\BaseController;
use think\facade\View;

class ViewTest extends BaseController
{

    public function user(){
        $arr=[['id'=>52,'sex'=>33,'name'=>'abc'],['id'=>44,'sex'=>33,'name'=>'sdf'],['id'=>22,'sex'=>33,'name'=>'xxx'],['id'=>55,'sex'=>33,'name'=>'tt']];
        View::assign('name','李');
        View::assign('fruitList',$arr);
        //$this->fetch();
        //$this->fetch();
        return View::fetch('user');
    }
}